#ifndef BOARDITEM_H
#define BOARDITEM_H

#include <QGraphicsItem>
#include <QPair>

class Board;

class BoardItem : public QGraphicsItem
{
public:
    typedef QPair<qint8,qint8> pos_t;

    explicit BoardItem(Board *board, qint32 scene_size, qint8 game_size = 7);

    virtual QRectF boundingRect() const;

    pos_t const &game_position() const;
    void set_game_position(pos_t const &pos);
    qint8 game_size() const;

    QPointF scene_item_center() const;
    QPointF scene_item_position() const;
    qint32 scene_size() const;

    qint32 item_size() const;

    Board *board();

    QPointF current_center() const;

private:
    Board *m_board;
    qint32 m_scene_size;
    qint8 m_game_size;
    pos_t m_game_pos;
};

#endif // BOARDITEM_H
